<?php
namespace app\admin\validate;
use think\Validate;
class Content extends Validate
{

   
    protected $rule = [
        ['title','require|max:25','标题必须填写|标题最大长度不能超过25个字符'],
        ['subtitle', 'require|min:6','副标题必须填写|副标题长度最少不能少于6个字符'],
        ['hits','require|number','访问量必填|访问量必须填写数字'],
        ['likes','require|number','点赞数必填|点赞数必须填写数字'],
        ['collects', 'require|number','收藏次数必填|收藏次数必须填写数字'],
        ['sort', 'require|number','排序必填|排序必须是数字']
    ];


    
     protected $scene = [
        'add'  =>  ['title'],
        'add_re' => ['title'],
    ];
}